package com.prime.tutorial.moviestore.view.logistics;

import com.prime.tutorial.moviestore.domain.Device;
import com.prime.tutorial.moviestore.service.logistics.LogisticsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * Users: me
 * Date: 1 бер 2010
 * Time: 21:39:48
 * @author iryna.masyuk
 */

@Component("listDevicesOnStorage")
@Scope("request")
public class ListDevicesOnStorage {

    private List<Device> devicesOnStorage;
    LogisticsService logisticsService;

    @Autowired
    public ListDevicesOnStorage(LogisticsService logisticsService) {
        this.logisticsService = logisticsService;
        devicesOnStorage = logisticsService.getDevicesOnStorage();
        
    }

    //-------------------getters&setters
    public List<Device> getDevicesOnStorage() {
            return devicesOnStorage;
        }

    public void setDevicesOnStorage(List<Device> devicesOnStorage) {
            this.devicesOnStorage = devicesOnStorage;
        }

}
